<link rel="stylesheet" type="text/css" href="../core/resource/css/coupon.css">
<div ng-include="sys_html('common/_header')"></div>
<div class="fui-page">
  <div class="jy2-headertopbg">
			<div class="fui-header" style="background:none">
				<div class="fui-header-left">
					<a class="back" style="color:#fff" href="javascript:" ng-click="goback()"></a>
				</div>
				<div class="title bold" style="font-size:1rem;color:#fff">详情</div>
			</div>
	</div>
	<div class="fui-content coupon-page jy2-headertop">
    <div class="coupon-detail {{pagedata.coupon.color}}">
      <div class="detail-dots"></div>
      <div class="detail-head">
        <div class="inner">
          <div class="title">
            <div class="text">{{pagedata.coupon.title}}</div></div>
          <div ng-if="pagedata.coupon.backtype==2" class="childs">
            <div class="child">
              <div class="subtitle">{{pagedata.coupon.title2}}</div>
              <div class="bigtitle">立返</div></div>
            <div class="child">
              <div ng-show="pagedata.coupon.backmoney>0" class="subtitle">
                <span class="bold">{{pagedata.coupon.backmoney}}</span>
                <span class="threetitle">元余额</span></div>
              <div ng-show="pagedata.coupon.backcredit>0" class="subtitle">
                <span class="bold">{{pagedata.coupon.backcredit}}</span>
                <span class="threetitle">积分</span></div>
              <div ng-show="pagedata.coupon.backredpack>0" class="subtitle">
                <span class="bold">{{pagedata.coupon.backredpack}}</span>
                <span class="threetitle">元红包</span></div>
            </div>
          </div>
          <div ng-if="pagedata.coupon.backtype!=2">
            <div class="bigtitle">{{pagedata.coupon.title3}}</div>
            <div class="subtitle">{{pagedata.coupon.title2}}</div></div>
          <div class="usetime">
            <div ng-if="pagedata.coupon.timelimittype==0" class="text">有效期: 永久有效</div>
            <div ng-if="pagedata.coupon.timelimittype==1" class="text">有效期: 领取后 {{pagedata.coupon.timedays}} 天内有效</div>
            <div ng-if="pagedata.coupon.timelimittype==2" class="text">有效期: {{pagedata.coupon.limittimes.tstart}}~{{pagedata.coupon.limittimes.tend}}</div></div>
        </div>
      </div>
      <div class="detail-body">
        <!-- {if $coupon['money']> 0||$coupon['credit']>0}
        <div class="block">
        <div class="title">所需金额与积分</div>
        {if $coupon['money'] > 0}
        <div class="text dot">所需金额:{$coupon['money']}</div>
        {/if}
        {if $coupon['credit'] > 0}
        <div class="text dot">所需积分:{$coupon['credit']}</div>
        {/if}
        </div> 
        {/if}-->
        <div class="block">
          <div ng-if="pagedata.coupon.merchid!=0">
            <div class="title">使用商铺</div>
            <div class="text">限购[{{pagedata.coupon.merchname}}]店铺商品</div></div>
          <div class="title">使用说明</div>
          <div class="text">
            <div ng-if="pagedata.coupon.isdescsys==1">
              <div ng-if="pagedata.coupon.coupontype==2">{{pagedata.coupon_setting.buydesc}}</div>
              <div ng-if="pagedata.coupon.coupontype==1">{{pagedata.coupon_setting.rechargedesc}}</div></div>
            <div ng-if="pagedata.coupon.isdescsys==0">{{pagedata.coupon.desc}}</div></div>
        </div>
        <div class="block">
          <div class="title">领取限制</div>
          <div ng-if="pagedata.coupon.islimitlevel==1">
            <div class="text bold">可领取会员组:</div>
            <div class="text bold">
              <div ng-repeat="item in pagedata.level">
                <div class="jylabel jylabel-red active">{{item.title}}</div></div>
            </div>
          </div>
          <div ng-if="pagedata.coupon.getmax">
            <div class="text">每人可领数量:{{pagedata.coupon.getmax}}</div></div>
          <div ng-if="pagedata.coupon.islimitlevel==0 && !pagedata.coupon.getmax" class="text">无</div></div>
        <div class="block">
          <div class="title">有效期限</div>
          <div class="text bold">
            <div ng-if="pagedata.coupon.timelimittype==0" class="text">有效期: 永久有效</div>
            <div ng-if="pagedata.coupon.timelimittype==1" class="text">有效期: 领取后 {{pagedata.coupon.timedays}} 天内有效</div>
            <div ng-if="pagedata.coupon.timelimittype==2" class="text">有效期: {{pagedata.coupon.limittimes.tstart}}~{{pagedata.coupon.limittimes.tend}}</div></div>
        </div>
        <div class="block">
          <div class="title">使用限制</div>
          <div ng-if="pagedata.coupon.limitusetype==1" class="text bold">不允许与促销优惠同时使用</div>
          <div ng-if="pagedata.coupon.limitusetype==2" class="text bold">不允许与会员折扣同时使用</div>
          <div ng-if="pagedata.coupon.limitusetype==3" class="text bold">不允许与促销优惠和会员折扣同时使用</div>
          <div ng-if="pagedata.coupon.limitgoodtype==1" class="text bold">允许以下商品使用:</div>
          <div ng-if="pagedata.coupon.limitgoodtype==1" ng-repeat="item in pagedata.goods">
            <div class="jylabel jylabel-red active">{{item.title}}</div></div>
          <div ng-if="pagedata.coupon.limitgoodcatetype==1" class="text bold">允许以下商品分类使用:</div>
          <div ng-repeat="item in pagedata.group">
            <div class="jylabel jylabel-red active">{{item.title}}</div></div>
          <div ng-if="pagedata.coupon.limitgoodtype==0 && pagedata.coupon.limitgoodcatetype==0 &&  pagedata.coupon.limitusetype==0 &&  pagedata.coupon.coupontype!=2" class="text bold">无</div></div>
      </div>
    </div>
  </div>
  <div class="fui-navbar">
    <div ng-if="pagedata.coupon.issend==1 && pagedata.coupon.canget==0" class="nav-item btn btn-gray">已达到{{pagedata.coupon.gettypestr}}上限</div>
    <div ng-if="pagedata.coupon.issend==1 && pagedata.coupon.pass && pagedata.coupon.canget==1" class="nav-item btn btn-{{pagedata.coupon.color}}" ng-click="post({couponid:pagedata.coupon.id,'actid':pagedata.actid},'jy_yousetli/exchange/getcoupon/')">立即兑换</div>
    <div ng-if="pagedata.coupon.issend==1 && !pagedata.coupon.pass && pagedata.coupon.canget" class="nav-item btn btn-gray">未达到{{pagedata.coupon.gettypestr}}权限</div>
	<div ng-if="pagedata.coupon.outtime" class="nav-item btn btn-gray">已过有效期</div>
	<div ng-if="pagedata.coupon.issend==0" class="nav-item btn btn-gray">活动还未开始</div>
	<div ng-if="pagedata.coupon.issend==2" class="nav-item btn btn-gray">活动已结束</div>
   </div>
</div>